/*
East Asian Welfare Regime Paper
Appendix1: Individual Level Analysis
July 9, 2025
Minjin Choi
*/

* All countries

clear all

use "/Users/jinny/Library/CloudStorage/OneDrive-UniversityofGeorgia/UGA/0_Dissertation/Ch1/test/multilevel_wave7_070825.dta", clear

gen C039_new = 6-C039
gen C041_new = 6-C041
gen E001_new = (E001 == 1)
gen D026_05_new = 6-D026_05
replace env_econ = . if env_econ == 3

keep if immigrant == 1

xtset cntry

xtreg welfare_chauvinism C039_new C041_new env_econ E001_new indi_respon E224 E227 D026_05_new age sex edu X028 id_lr political_disinterest national_pride, fe

esttab using "linear_model_world_070925.tex", ///
    replace ///
    se ///
    b(2) se(2) ///
    star(* 0.05 ** 0.01 *** 0.001) ///
    label ///
    noobs nomtitle ///
    title("Linear Regression of Welfare Chauvinism with Country Fixed Effects") ///
    addnotes("Country Fixed Effects included")
	

* Asian countries

clear all

use "/Users/jinny/Library/CloudStorage/OneDrive-UniversityofGeorgia/UGA/0_Dissertation/Ch1/test/multilevel_wave7_070825.dta", clear

gen C039_new = 6-C039
gen C041_new = 6-C041
gen E001_new = (E001 == 1)
gen D026_05_new = 6-D026_05
replace env_econ = . if env_econ == 3

keep if COUNTRY == "Japan" | COUNTRY == "South Korea" | COUNTRY == "Taiwan"
keep if immigrant == 1

encode COUNTRY, gen(country_id)

xtset country_id

xtreg welfare_chauvinism C039_new C041_new env_econ E001_new indi_respon E224 E227 D026_05_new age sex edu X028 id_lr political_disinterest national_pride, fe 
	
esttab using "linear_model_asia_070925.tex", ///
    replace ///
    se ///
    b(2) se(2) ///
    star(* 0.05 ** 0.01 *** 0.001) ///
    label ///
    noobs nomtitle ///
    title("Linear Regression of Welfare Chauvinism with Country Fixed Effects") ///
	addnotes("Country Fixed Effects included")

